package spring.learn.core.ioc.config;

import org.springframework.context.annotation.*;
import spring.learn.core.ioc.data.DemoA;
import spring.learn.core.ioc.data.DemoB;
import spring.learn.core.ioc.data.PetService;

@Configuration
public class AnnotationConfiguration {


    @Bean
    @Lazy
    public PetService petService() {
        return new PetService();
    }

    @Bean
    public DemoA demoA() {
        return new DemoA();
    }

    @Bean
    @DependsOn("demoA")
    public DemoB demoB() {
        return new DemoB();
    }
}
